﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using WGM_Silverlight.Controls;

namespace WGM_Silverlight.Views
{
    public partial class NetworksView : UserControl
    {
        public NetworksView()
        {
            InitializeComponent();
        }
        public string Username
        {
            get { return _loggedOnAsTB.Text; }
            set { _loggedOnAsTB.Text = value; }
        }
        public event MouseButtonEventHandler LogoffClick
        {
            add
            {
                _logoffCompletelyTb.MouseLeftButtonDown += value;
            }
            remove
            {
                _logoffCompletelyTb.MouseLeftButtonDown -= value;
            }
        }
        public event MouseButtonEventHandler RefreshNetworksClick
        {
            add
            {
                _refreshNetworksTb.MouseLeftButtonDown += value;
            }
            remove
            {
                _refreshNetworksTb.MouseLeftButtonDown -= value;
            }
        }
        public void AddNetwork(NetworkInfo ni)
        {
            _networksPanel.Children.Add(ni);
        }
        public void RemoveNetwork(NetworkInfo ni)
        {
            _networksPanel.Children.Remove(ni);
        }
        public void ClearNetworks()
        {
            _networksPanel.Children.Clear();
        }

    }
}
